exists
Checks if a value is not null
or empty.
An argument can be:
Nullable type (
T?
) - checked fornull
.Collection (
list
,set
,map
) - checked for being empty (a nullable collection is also checked fornull
).
Special case: when used within a database at-expression, and the argument is also a database at-expression, it becomes a nested at-expression, which can use entities of the outer one. The call is translated into the SQL EXISTS
clause with a nested SELECT
.
Return
true
if the value is not null
and not an empty collection
Since
0.6.0
See also
empty(. . . )
empty(...)